In text-based programming languages, such as C, C++ and Java, coding standards have been applied to promote higher quality of programs. An example of such coding standards can be found in MISRA-C, which is a popular standard for C code created by the Motor Industry Software Reliability Association (MISRA). MISRA-C has been developed to provide guidelines for the use of the C language in critical systems. MISRA-C is becoming more important for real-time embedded applications within the automotive and aerospace industries.
Recently, various classes of graphical programs have been used to describe computations that can be performed on application-specific computing hardware, such as a computer, microcontroller, FPGA, and custom hardware. Classes of such graphical programs may include time-based block diagrams such as those found within Simulink® from The MathWorks, Inc. of Natick, Mass., state-based and flow diagrams such as those found within Stateflow® from The MathWorks, Inc. of Natick, Mass., and data-flow diagrams. A common characteristic among these various forms of block diagrams is that they define semantics on how to execute the diagram.
The graphical programs are useful particularly for designing and simulating complex systems arising in application domains, such as automotive, aerospace, and communication engineering. Safety and security are important factors with the systems implemented in these application domains. However, the conventional graphical programming environments do not provide any mechanisms for checking the compliance of the MISRA-C guidelines or other safety coding standards in the graphical programs. Therefore, it is desired to provide mechanisms to apply various coding standards, including MISRA-C, to graphical programs.